<template>
  <view :class="classes" v-if="info && Object.keys(info)">
    <!-- 根据展示信息的多少，分为3种展示风格：simple，base，complex -->
    <vin-comment-header :type="headerType" :info="info" :labels="labels" @handleClick="handleClick">
      <template #labels>
        <slot name="comment-labels"></slot>
      </template>
    </vin-comment-header>

    <slot name="feature"></slot>

    <view
      class="vin-comment__main"
      :style="`-webkit-line-clamp:${conEllipsis}`"
      @click="handleClick"
      v-html="info.content?.replace(/\n/g, '<br>')"
    ></view>

    <vin-comment-images
      :images="images"
      :videos="videos"
      :type="imagesRows"
      @clickImages="clickImages"
    ></vin-comment-images>

    <view class="vin-comment__follow" v-if="follow && follow.days > 0" @click="handleClick">
      <view class="vin-comment__follow-title">购买{{ follow.days }}天后追评</view>
      <view class="vin-comment__follow-com">{{ follow.content }}</view>
      <view class="vin-comment__follow-img" v-if="follow.images && follow.images.length > 0"
        >{{ follow.images.length }} 张追评图片 <vin-icon size="12" name="right"
      /></view>
    </view>

    <vin-comment-bottom
      :type="headerType"
      :info="info"
      :operation="operation"
      @clickOperate="clickOperate"
      @handleClick="handleClick"
    ></vin-comment-bottom>

    <slot name="cmt-shop-reply"></slot>
  </view>
</template>
<script>import s from './index.js';export default s;</script>